﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace testDecorator
{
    class Program
    {
        static void Main(string[] args)
        {
            // 订一杯Espresso，不需要调料，打印出它的描述与价钱。
            Beverage beverage = new Espresso();
            Console.WriteLine(beverage.GetDescription() + " $" + beverage.cost());

            Beverage beverage2 = new DarkRoast();
            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);
            Console.WriteLine(beverage2.GetDescription() + " $" + beverage2.cost());

            Console.Read();
        }
    }
}
